#include<bits/stdc++.h>
using namespace std;
vector<int>v;
int main(){
	for(int i = 1 ; i <= 7 ; i++){
		v.push_back(i);
	}
	cout << v.size() << endl; 
	cout << v.front() << " " << v.back() << endl;
	for(int i = 0 ; i < v.size() ; i++){
		cout << v[i] << " ";
	}
	cout << endl;
	for(auto it = v.begin() ; it != v.end() ; it++){
		cout << *it << " ";
	}
	cout << endl;
	return 0;
}
